package org.tom.org.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.tom.basic.domain.BaseDomain;

import java.text.SimpleDateFormat;
import java.util.Date;

@Data
public class Shop extends BaseDomain {
    private String name;
    private String tel;
    private Date registerTime = new Date();
    private Integer state = 0;
    private String address;
    private String logo;
    private Long admin_id;
    private Employee admin; // 使用对象接收
   // @JsonFormat(pattern="yyyy-MM-dd-HH-mm-ss",timezone="GMT+8")
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    public Date getRegisterTime() {
        return registerTime;
    }
    //@JsonFormat(pattern="yyyy-MM-dd-HH-mm-ss",timezone="GMT+8")
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    public void setRegisterTime(Date registerTime) {
        this.registerTime = registerTime;
    }
}
